home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1222 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: newshost.lanl.gov!tanmoy
  2. From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: How do you pass along a variable argument list?
  5. Date: 12 Jan 1996 06:01:39 GMT
  6. Organization: Los Alamos National Laboratory
  7. Message-ID: <TANMOY.96Jan11230139@qcd.lanl.gov>
  8. References: <4d1i8v$k8h@news.mcl.bdm.com> <4d30nv$k8r@tahko.lpr.carel.fi>
  9.     <TANMOY.96Jan11091945@qcd.lanl.gov>
  10.     <30f5cfa3.8792640@nntp.ix.netcom.com>
  11. NNTP-Posting-Host: qcd.lanl.gov
  12. Mime-Version: 1.0
  13. Content-Type: text
  14. In-reply-to: miker3@ix.netcom.com's message of Fri, 12 Jan 1996 03:54:38 GMT
  15.  
  16. --text follows this line--
  17. In article <30f5cfa3.8792640@nntp.ix.netcom.com> miker3@ix.netcom.com
  18. (Mike Rubenstein) writes: 
  19. <snip>
  20.    |>
  21.    |>   #include    <stdio.h>
  22.    |>   #include    <stdarg.h>
  23.    |>
  24.    |>   void    MyPrintf(char *fmt, ...)
  25.    |>   {
  26.    |>       va_list    argp;
  27.    |>
  28.    |>       va_start(argp, fmt);
  29.    |>       printf(fmt, argp);
  30.    |>
  31.    |>Did you try this? A conforming compiler is _required_ to diagnose
  32.    this.
  33.    |>
  34.    |>       va_end(argp);
  35.    |>   }
  36.  
  37.    I'm missing something here.  Why is a conforming compiler required
  38. to
  39.  
  40. No you are not. I am. My brains.
  41.  
  42. Apologies to all for this stupidity (I am continually amazed at my
  43. capacity for misspeaking): the code is definitely wrong, but there is
  44. no _requirement_ for diagnosis.
  45.  
  46. Cheers
  47. Tanmoy
  48. --
  49. tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
  50. Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
  51. Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
  52. <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
  53. internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
  54. fax: 1 (505) 665 3003   voice: 1 (505) 665 4733    [ Home: 1 (505) 662 5596 ]
  55.